define(function(require, exports, module) {
	"use strict";
	require('./jquery-3.1.1.js');
	var getScreenDataList = require('./getScreenDate.js');
	var now = new Date(); //当前日期
	var nowDayOfWeek = now.getDay(); //今天本周的第几天
	var nowDay = now.getDate(); //当前日
	var nowMonth = now.getMonth(); //当前月
	var nowYear = now.getFullYear(); //当前年 

	function getMonthDays(myMonth) {
		var monthStartDate = new Date(nowYear, myMonth, 1);
		var monthEndDate = new Date(nowYear, myMonth + 1, 1);
		var days = (monthEndDate - monthStartDate) / (1000 * 60 * 60 * 24);
		return days;
	}

	function formatWeekDay(str) {
		var data = '' + str + '';
		var dataitem = data.split(' ');
		return dataitem;
	}

	function formatMonth(str) {
		switch(str) {
			case 'Jan':
				var strMonth = 1;
				break;
			case 'Feb':
				var strMonth = 2;
				break;
			case 'Mar':
				var strMonth = 3;
				break;
			case 'Apr':
				var strMonth = 4;
				break;
			case 'May':
				var strMonth = 5;
				break;
			case 'Jun':
				var strMonth = 6;
				break;
			case 'Jul':
				var strMonth = 7;
				break;
			case 'Aug':
				var strMonth = 8;
				break;
			case 'Sep':
				var strMonth = 9;
				break;
			case 'Oct':
				var strMonth = 10;
				break;
			case 'Nov':
				var strMonth = 11;
				break;
			case 'Dec':
				var strMonth = 12;
				break;
		}
		return strMonth;
	}
	//获取今天的年月日
	var startendNowDay = nowYear + '-' + (nowMonth + 1) + '-' + nowDay;
	//获取本周的起始年月日
	var startWeek = formatWeekDay(getScreenDataList.getWeekStartDate());
	var endWeek = formatWeekDay(getScreenDataList.getWeekEndDate());
	var startNowWeek = startWeek[3] + '-' + formatMonth(startWeek[1]) + '-' + startWeek[2];
	var endNowWeek = endWeek[3] + '-' + formatMonth(endWeek[1]) + '-' + endWeek[2];
	//获取上周的起始年月日
	var newstartLastWeek = formatWeekDay(getScreenDataList.getLastWeekStartDate());
	var newendLastWeek = formatWeekDay(getScreenDataList.getLastWeekEndDate());
	var startLastWeek = newstartLastWeek[3] + '-' + formatMonth(newstartLastWeek[1]) + '-' + newstartLastWeek[2];
	var endLastWeek = newendLastWeek[3] + '-' + formatMonth(newendLastWeek[1]) + '-' + newendLastWeek[2];
	//获取本月的起始年月日
	var startMonth = formatWeekDay(getScreenDataList.getMonthStartDate());
	var endMonth = formatWeekDay(getScreenDataList.getMonthEndDate());
	var startNowMonth = startMonth[3] + '-' + formatMonth(startMonth[1]) + '-' + startMonth[2];
	var endNowMonth = endMonth[3] + '-' + formatMonth(endMonth[1]) + '-' + endMonth[2];
	//获取本月的起始年月日
	var newstartLastMonth = formatWeekDay(getScreenDataList.getLastMonthStartDate());
	var newendLastMonth = formatWeekDay(getScreenDataList.getLastMonthEndDate());
	var startLastMonth = newstartLastMonth[3] + '-' + formatMonth(newstartLastMonth[1]) + '-' + newstartLastMonth[2];
	var endLastMonth = newendLastMonth[3] + '-' + formatMonth(newendLastMonth[1]) + '-' + newendLastMonth[2];

	$('#allDay').attr({
		'data-stateDate': '',
		'data-endDate': ''
	});
	$('#nowDay').attr({
		'data-stateDate': startendNowDay,
		'data-endDate': startendNowDay
	});
	$('#nowWeek').attr({
		'data-stateDate': startNowWeek,
		'data-endDate': endNowWeek
	});
	$('#lastWeek').attr({
		'data-stateDate': startLastWeek,
		'data-endDate': endLastWeek
	});
	$('#nowMonth').attr({
		'data-stateDate': startNowMonth,
		'data-endDate': endNowMonth
	});
	$('#lastMonth').attr({
		'data-stateDate': startLastMonth,
		'data-endDate': endLastMonth
	});

});